<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./echarts/echarts.min.js"></script>
</head>
<body>
  <!-- 2.为ECharts准备一个具备大小（宽高）的Dom -->
  <div id="main" style="width: 600px;height:400px;"></div>
  <script>
    // 3.1 基于准备好的dom，初始化echarts实例
    let myChart = echarts.init(document.querySelector('#main'))
    const option = {
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          data: [820, 932, 901, 934, 1290, 1330, 1320],
          type: 'line',
          smooth: true
        },
        {
        name: 'Email',
        type: 'line',
        smooth: true,
        data: [600, 355, 1041, 904, 1290, 1576, 1836]
      }
      ]
    }
    // 3.3使用刚指定的配置项和数据显示图表。
    myChart.setOption(option)
</script>
</body>
</html>